<?php
echo $html->css ( 'tab' );
echo $html->css ( 'jquery-validate/css/screen' );
echo $html->css('start/jquery-ui-1.8.2.custom');
echo $javascript->link('jquery-ui-1.8.2.custom.min');
?>
<script type="text/javascript">
$(document).ready(function(){
	 $.validator.setDefaults({ 
		 submitHandler: function(form) {
  
		  form.submit();    
		}       
	});
	 
	// validate signup form on keyup and submit
	$("#f1").validate({
		rules: {
		"data[Channelmanage][name]": {
		required: true,string:true,stringMinLength:0,stringMaxLength:100
		},
		"data[Channelmanage][signatory]": {
				required: false,formatOfName:true,stringMinLength:0,stringMaxLength:100
			},
		"data[Channelmanage][startTimes]":{
				required: false,dateISO:true
			},	
		"data[Channelmanage][endTime]":{
				required: true, dateISO:true
			}
		},
		messages: {
		},
		//设置验证触发事件 
		focusInvalid: false, 
		onkeyup: false, 
		//设置错误信息提示DOM  
		errorPlacement: function(error, element) { 
		error.appendTo( element.parent()); 
		}
	});	
});	
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
		 $("#d1").val("<?php echo $data["Contractmanagement"]["datesigned"];?>");
		 $("#d2").val("<?php echo $data["Contractmanagement"]["startTime"];?>");
		 $("#d3").val("<?php echo $data["Contractmanagement"]["endTime"];?>");
		 $("#d4").val("<?php echo $data["Contractmanagement"]["warntime"];?>");
	});
	
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Channelmanage');//一级目录
										   echo '>';echo __('Channelmanage');//二级目录
										   echo '>';echo __('contractmanagementlist');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('editcontractmanagement',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<?php echo $form->create('Channelmanage',array('action'=>'editcontractmanagement','type'=> 'post','enctype'=>'multipart/form-data','id'=>'f1'));?>
<div class="tabflex">
<fieldset><legend><?php echo __('editcontractmanagement')?></legend>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<legend><?php echo __('contractmanagementlist information')?></legend>
		<tr>
			<td width="5%"></td>
			<td width="10%"><?php echo __('contractmanagementlist Name');//合同名称?>:<font color="red">*</font></td>
			<td width="35%">
		<?php 
			echo $form->input('name',array('label'=>false,'class' => 'TextBoxE1','default'=>$data['Contractmanagement']['name']));	
		?>
			</td>
			<td width="5%"></td>
			<td width="10%"><?php echo __('contractmanagementlist signatory');//签约人?>:</td>
			<td width="35%">
		<?php 
			echo $form->input('signatory',array('label'=>false,'class' => 'TextBoxE1','default'=>$data['Contractmanagement']['signatory']));	
		?>
		</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('contractmanagementlist datesigned');//签约时间?>:</td>
			<td>
		<span class="datepickerSpan">
		<?php 
			echo $form->input('datesigned',array('label'=>false,'class' => 'TextBoxE1','id'=>'d1','default'=>$data['Contractmanagement']['datesigned']));
		?>
		</span>
		</td>
			<td></td>
			<td><?php echo __('contractmanagementlist Coat');//合同金额?>:</td>
			<td>
		<?php 
			echo $form->input('amount',array('label'=>false,'class' => 'TextBoxE1','default'=>$data['Contractmanagement']['amount']));
		?>
		</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('contractmanagementlist paymentmethod');//付款方式?>:</td>  
			<td>
		<?php 
			echo $form->input('paymentmethod',array('label'=>false,'class' => 'TextBoxE1','default'=>$data['Contractmanagement']['paymentmethod']));	
		?>
		</td>
			<td></td>
			<td><?php echo __('StartUseTime');//开始时间?>:</td>
			<td>
		<span class="datepickerSpan">
		<?php 
			echo $form->input('startTime',array('label'=>false,'class' => 'TextBoxE1','id'=>'d2','default'=>$data['Contractmanagement']['startTime']));
		?>
		</span>
		</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('EndUseTime');//结束时间?>:<font color="red">*</font></td>
			<td>
		<span class="datepickerSpan">
		<?php 
			echo $form->input('endTime',array('label'=>false,'class' => 'TextBoxE1','id'=>'d3','default'=>$data['Contractmanagement']['endTime']));
		?>
		</span>
		</td>
		</tr>
	</table>
	<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">	
		<legend><?php echo __('contractmanagementlist remind')?></legend>	
			<td width="5%"></td>
			<td width="10%"><?php echo __('Contractmanagement reminder');//提醒人?>:</td>   
			<td width="35%">
		<?php 
		echo $form->input('reminder',array('options'=>$op1,'class' => 'TextBoxE1','label'=>false,'div'=>false,'default'=>$data['Contractmanagement']['reminder']));	
			//echo $form->input('reminder',array('label'=>false,'default'=>$data['Contractmanagement']['reminder']));
		?>
		</td>
			<td width="5%"></td>
			<td width="10%"><?php echo __('Schedule remindTime');//提醒时间?>:</td>
			<td width="35%">
		<span class="datepickerSpan">
		<?php 
			echo $form->input('warntime',array('label'=>false,'class' => 'TextBoxE1','id'=>'d4','default'=>$data['Contractmanagement']['warntime']));
		?>
		</span>
		</td>
	</tr>
	<tr>	
			<td></td>
			<td><?php echo __('Schedule remindBefore');//提前时间?>:</td> 
			<td>
		<?php 
			echo $form->input('warnbefore',array('label'=>false,'class' => 'TextBoxE1','after'=>'&nbsp;天','div'=>false,'default'=>$data['Contractmanagement']['warnbefore']));
		?>
		</td>
		<td></td>
		<td><?php echo __('Schedule remindSpacing');//间隔时间:?>:</td>
		<td>
		<?php 
			echo $form->input('internaltime',array('label'=>false,'class' => 'TextBoxE1','div'=>false,'after'=>'&nbsp;分','default'=>$data['Contractmanagement']['internaltime']));
		?>
		</td>
		</tr>
		<tr>
		<td></td>
		<td style="vertical-align:top;"><?php echo __('Base information');//基本信息?>:</td>
		<td  colspan="4">
		<?php 
			echo $form->textarea('basicmessage',array('label'=>false,'class' => 'areaStyle','default'=>$data['Contractmanagement']['basicmessage']));
		?>
		</td>
		</tr>
		<tr>
		<td></td>
		<td style="vertical-align:top;"><?php echo __('memo');//备注?>:</td>
		<td  colspan="4">
		<?php 
			echo $form->textarea('memo',array('label'=>false,'class' => 'areaStyle','default'=>$data['Contractmanagement']['memo']));
		?>
		</td>
		</tr>
</table>
</fieldset>
<table width="30%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('返回',array('type'=>'button','class'=>'backsubmit','onclick'=>'history.back(-1)'));?>  <!-- 返回上一级-->
		</td>
		<td width="100"><?php echo $form->button('重置',array('type'=>'reset','class'=>'resetsubmit'));?>  <!-- __('reset', true)取消-->
		</td>
		<td width="100"><?php echo $form->button('确定',array('type'=>'submit','class'=>'oksubmit'));?></td>

	</tr>
</table>
</div>
<?php echo $form->hidden('id',array('default'=>$data['Contractmanagement']['id']));?>
<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>
<?php echo $form->hidden('channelmanage_id',array('default'=>$channelmanageid));?>
<?php echo $form->hidden('scheduleid',array('default'=>$data['Contractmanagement']['scheduleid']));?>
<?php echo $form->end();?>

